-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Metadata server address modification to account for default port #12468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Metadata server address modification to account for default port #12468
Conversation
|
/gcbrun |
| String host = envValue; | ||
| int portIndex = host.lastIndexOf(':'); | ||
| if (portIndex != -1) { | ||
| host = host.substring(0, portIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overriding the port is surprising. There should be some comment or such about what is going on.
(From what I can tell, the environment variable is normally accessing port 80. But for ALTS we use a different port, so we want to ignore the port because isn't the same port as used for authentication tokens.)
|
Changed the utilization of the GCE Metadata host server address environment variable so that if a port is specified or unspecified, it defaults to use port 8080 for ALTS handshake. Tested scenarios where environment variable was not set, environment variable was set but with no port, and environment variable was set with a port other than 8080 |
|
/gcbrun |
Fixing the utilization of the GCE Metadata host server address environment variable to account for the case where the user does not specify a port (defaults to port 8080)
b/451639946
cc: @apolcyn, @anicr7